home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1996 June / MACPOWER-1996-06.ISO.7z / MACPOWER-1996-06.ISO / AMUG / UTILITY_40 / MacShell 0.54b / MacShell.0.54b / MacShell.0.54b / MacShell.0.54b.rsrc / help_22955_alias < prev    next >
Text File  |  1996-01-21  |  2KB  |  34 lines

  1. NAME
  2.    alias - define a shell alias
  3.  
  4. SYNTAX
  5.    alias keyword "word list"
  6.  
  7. DESCRIPTION
  8.  
  9. The alias substitution mechanism provides a simple way for the user to change the meaning of a command, or to build a new command from  existing commands.  The mechanism substitutes a predefined word list in place of  the first word on a command line (or the first word on a line in a script).  
  10.  
  11. The built-in command 'alias' is used to define aliases, and to display a list of defined aliases.  
  12.  
  13. If it is called without arguments, 'alias' simply displays a list of the keywords and values of the currently defined aliases.
  14.  
  15. If called with arguments, 'alias' will attempt to make a new alias definition.  The first argument following the command is the keyword which will be substituted when it occurs as the first word on subsequent command lines.  The word list which follows the keyword will be substituted in place of the key.  The word list should be quoted when it contains more than one word.  
  16.  
  17. Any words in the word list which contain characters which should be hidden from the shell (eg. the glob character '*') must be quoted again with the 'other' kind of quotes:  For example, if the entire word list is quoted with single quotes, arguments to be hidden should be quoted with double quotes, and vice versa.  
  18.  
  19. It is most convenient to define aliases in one's startup file 'macshell.rc', so that they will be applied automatically to each session.  The user should define any long, complex, and frequently used command as an alias, so that it can be invoked with greater ease.
  20.  
  21. RESTRICTIONS
  22.  
  23. MacShell's alias substitution capabilities are limited in the following ways (compared with some unix shells):
  24.  
  25. - Alias substitution is not carried out recursively.
  26.  
  27. - It is not possible for an alias definition to contain arguments
  28. which are replaced at runtime.
  29.  
  30. SEE ALSO
  31.    unalias
  32.  
  33.